<?php 
/* SVN FILE: $Id$ */
/* PostAttachment Test cases generated on: 2009-11-23 12:19:04 : 1258978744*/
App::import('Model', 'PostAttachment');

class PostAttachmentTestCase extends CakeTestCase {
	var $PostAttachment = null;
	var $fixtures = array('app.post_attachment', 'app.post');

	function startTest() {
		$this->PostAttachment =& ClassRegistry::init('PostAttachment');
	}

	function testPostAttachmentInstance() {
		$this->assertTrue(is_a($this->PostAttachment, 'PostAttachment'));
	}

	function testPostAttachmentFind() {
		$this->PostAttachment->recursive = -1;
		$results = $this->PostAttachment->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('PostAttachment' => array(
			'id'  => 1,
			'name'  => 'Lorem ipsum dolor sit amet',
			'number'  => 'Lorem ipsum dolor sit amet',
			'post_id'  => 1,
			'created'  => '2009-11-23 12:19:04'
		));
		$this->assertEqual($results, $expected);
	}
}
?>